package il.ac.braude.sona.constants;

import java.awt.Font;
import java.awt.Image;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;
/**
 * Static class for resources we use all over the project including strings,fonts and images
 * 
 * @author Ofek Ron
 * @author Avihay Avitan
 * @author Nitzan Inbar
 * @author Sasha Rosental
 */
public class Resources {

	
	public static Font applicationFont;
	public static Font Futura18;
	public static Font Futura20;
	/**
	 * Static class for Strings we use all over the project
	 * 
	 * @author Ofek Ron
	 * @author Avihay Avitan
	 * @author Nitzan Inbar
	 * @author Sasha Rosental
	 */
	public static class Strings {
		public static final String Report_Error = "No data for generating a report";
		public static final String[] reportsArray = {"argument 1","argument 2","argument 3"};
		public static final String LoginFormTitle = "Welcome To ICM";
		public static final String P_report = "Periodic Report";
		public static final String E_report = "Extensions Report";
		public static final String D_report = "Delays Report";
		public static final String[] ReportsArray = {"Periodic Report","Extensions Report","Delays Report"};
		public static final String OK = "OK";
		public static final String LoginTitle = "ORT-Braude Information Systems Change Management";
		public static final String Signin = "Sign in";
		public static final String Password = "Password : ";
		public static final String UserName = "UserName : ";
		public static final String IncorrectLogin = "Login info is incorrect.";
		public static final String ICMsystem = "ICM";
		public static final String CreateChangeReq = "Create Change Request";
		public static final String ViewRequestByID = "View Request By ID";
		public static final String ReqFormTitle = "Create Request";
		public static final String RequestTitleField = "Title : ";
		public static final String RequestChooseSystemField = "Choose system : ";
		public static final String RequestPresentStateField = "Current state : ";
		public static final String RequestSuggestedChangeField = "Suggested change : ";
		public static final String RequestChangeExplanationField = "Explanation : ";
		public static final String RequestCommentField = "Comment : ";
		public static final String RequestApproveID = "The change request is saved in the Database. \nPlease save the request id for monitoring request state in the future. \nRequest ID : %s";
		public static final String ViewFormRequID = "Request ID";
		public static final String RequestInfoTitle = "Request Info";
		public static final String NoSuchRequest = "There is no such Request.";
		public static final String NoUsersFound = "There is no worker users";
		public static final String ViewAllRequests = "View All Requests";
		public static final String Connecting = "Waiting for server Response...";
		public static final String ConnectFailed = "Connection Failed.";
		public static final String PendingRequests= "Pending Requests";
		public static final String Reports = "Reports";
		public static final String AppointedSuccesfully = "Workers have been appointed succesfully";	
		public static String[] informationSystems;
		public static String workerList="Workers list";
		public static String reqExtension = "Request Extension";
		public static String reqGranted = "Extension already granted, can't request again";
		public static String DaysNotValid = "More then 3 days left for execution";
		public static String ValidExtension = "valid extension";
		public static final String ExtensionRequests = "Extensions requests";
		public static final String RequestIssued = "Your Request had been issued and is waiting approval";
		public static final String ViewWorkers = "View Workers List";
		public static final String Browse = "Browse";
		public static final String RequestFile = "Choose a File : ";
		public static final String PreparingFiles = "Preparing files...";
		public static final String UploadingFiles = "Uploading files...";
		public static final String UploadingFilesError =  "Uploading files failed";
		public static final String Saveas = "Save as..";
		public static final String Downloading = "Downloading...";
		public static final String DownloadedSuccesfuly = "File has been downloaded Successfully and saved to %s.";
		public static final String GettingMssgs = "Getting your system Pending requests...";
		public static final String Submit = "Submit";
		public static final String EstimateTimeDone = "Estimate time updated";
		public static final String EstimateTimeApproved = "Estimate time approved";
		public static final String NewPendingRequest = "You have a new pending Request please check your pending requests for more details.";
		public static final String Approve = "Approve";
		public static final String EditDays = "Edit evaluation days";
		public static final String EnterDays = "Enter days";
		public static final String EnterExplenation = "Enter explenation";
		public static final String SurveyReportDescription = "Requested change description";
		public static final String SurveyReportResults = "Changes results";
		public static final String SurveyReportConstraints = "Constraints";
		public static final String SurveyReportRisks = "Available risks";
		public static final String SurveyReportEvaluatedDays = "Evaluated days:";
		public static final Object SurveyReportSaved = "Survey report saved. Thank you!";
		public static final String SurveyReportAdditionalData = "Additional data";
		public static final String SurveyRequestAdditionalData = "Request additional data";
		public static final String Successed = "Update successfull";
		public static final String Execute = "EXECUTE";
		public static final String Reject = "REJECT";
		public static final String DesicionUpdated = "Decision updated and waiting for Chairman approval";
		public static final String ChangeDecision = "Change Decision";
		public static final String DesicionApproved = "Decision approved successfully";
		public static final String TestReportSaved = "Failurs report saved, Thank you!";
		public static final String NecesseryFieldsAreNotFilled = "Please fill necessery fields";
		public static final String ExecutedMessageToUser="Dear user,\n\n Your change request is accomplished and waiting for your confirmation,\n\nBest regards,\nICM Management";
		public static final String RejectedMessageToUser="Dear user,\n\n Unfortunately, Your change request has been rejected, Please confirm ASAP,\n\nBest regards,\nICM Management";
		public static final String EmailSignature="\n\nBest regards,\nICM Management";
		public static final String RemainderMessageToWorker="Dear worker,\n\n You have one day left to complete your task at request ";
		public static final String AppointManagement = "Appoint Management";
		public static final String Exception = "Exception in rid = %s, request handle takes more time then expected.";
		public static final String Reminder = "Reminder rid = %s, request is due to progress to the next step in 1 day.";
		public static final String Notice = "Notice a request is pending to your attention please check rid = %s.";
		public static final String SuspendedMsg = "This request has been suspended";
		public static final String Messeges = "Messeges Inbox";
		public static final String DeleteMssg = "Delete Message";
		public static final String DateListQuesry = " (SELECT 0 a UNION SELECT 1 a UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7  UNION SELECT 8 UNION SELECT 9 ) d, (SELECT 0 b UNION SELECT 10 UNION SELECT 20     UNION SELECT 30 UNION SELECT 40 UNION SELECT 50 UNION SELECT 60 UNION SELECT 70    UNION SELECT 80 UNION SELECT 90 UNION SELECT 100 UNION SELECT 110 UNION SELECT 120 UNION SELECT 130 UNION SELECT 140   UNION SELECT 150 UNION SELECT 160 UNION SELECT 170 UNION SELECT 180)";
	}
	
	/**
	 * This class handle GUI images for view
	 * @author Ofek Ron
	 * @author Avihay Avitan
	 * @author Nitzan Inbar
	 * @author Sasha Rozenthal 
	 */
	public static class Images {
		/**
		 * 
		 * @param iname
		 * @return icon - an image from iname URL
		 */
		private static Image getImage(String iname) {
	        URL imgURL = null;
			// In the debug, the images can be found in the classpath
	        if (imgURL == null)
	        {
	            imgURL = ClassLoader.getSystemResource(iname);
	        }
	        Image icon = null;
	        if (imgURL != null)
	        {
	            try {
					icon = ImageIO.read(imgURL);
				} catch (IOException e) {
					e.printStackTrace();
				}
	        }
	        return icon;
		}
		public static final Image Background = getImage("header.jpg");
		//public static final Image ICMBackground = getImage("bCKGR.jpg");

		
	}

}
